#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
	int n;
	while (cin >> n, n) {
		if (n == 0) {
			break;
		}
		double sum = n;
		for (int i = 1; i < n; i++) {
			sum += (1.0 / (i + 1)) * 2 * (n - i);
		}
		printf("%.2f\n", sum);
	}
	return 0;
}